// 用户模型文件

const mongoose = require('../config/db')

const userSchema = new mongoose.Schema(
    {
        // 用户名
        username: {
            type: String,
            required: true,
        },
        // 密码
        password: {
            type: String,
            required: true
        },
        nickname: {
            type: String,
            required: true
        }
    }
)
const UserModel = mongoose.model('user', userSchema)
module.exports = UserModel